//
//  ViewController.m
//  FMDBManager
//
//  Created by jiangjunwy on 16/8/3.
//  Copyright © 2016年 SanYouApp. All rights reserved.
//

#import "ViewController.h"
#import "FMDB.h"
#import "FMDBManager.h"
#import "userModel.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    userModel * model = [[userModel alloc]init];
    model.name = @"王健2";
    model.age = @"0";
    model.num = @"0";
    
//    [[FMDBManager sharedInstace] creatTable:model];
    [[FMDBManager sharedInstace] insertAndUpdateModelToDatabase:model];
//    userModel * model1 = [[userModel alloc]init];
//    model1.name = @"王健";
//    model1.age = @"661";
//    model1.num = @"002";
    
//    [[FMDBManager sharedInstace] deleteAllModelInDatabase:@"userModel"];
//    [[FMDBManager sharedInstace] insertAndUpdateModelToDatabase:model1];
   NSArray * aaaaa = [[FMDBManager sharedInstace] selectModelArrayInDatabase:model];
    
    
//    [[FMDBManager sharedInstace] deleteModelInDatabase:model];
    // Do any additional setup after loading the view, typically from a nib.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
